1. Field of the Invention
The present invention relates to programmable controllers that include a base unit having a plurality of slots, or spaces where modules are to be mounted, arranged from a first end to a second end, and the modules mounted in the slots.
2. Description of the Related Art
Programmable controllers are what is called programmable logic controllers (PLCs), or control devices that sequentially perform the steps of control in predetermined order or according to predetermined procedures. For example, a safety door is installed around a machine tool that machines workpieces. The safety door is installed to separate the operator from the machine tool to ensure operator's safety. A machining start button for starting machining of the machine tool may be provided at a position slightly away from the safety door, and an emergency stop button may be provided next to the machining start button. The safety door may be provided with a limit switch that detects if the safety door is open or closed. The machine tool may be provided with a predetermined sensor that detects completion of machining.
In this case, signals from the limit switch, the machining start button, the emergency stop button, and the predetermined sensor are input to the programmable controller, and an operation start control signal that starts operation of the machine tool and an operation stop control signal that stops operation of the machine tool are output from the programmable controller. The programmable controller proceeds with the steps of control (e.g., starts operation of the machine tool, and stops operation of the machine tool if it detects completion of machining) only when it detects predetermined order (e.g., if it detects that the machining start button is turned on after the safety door is closed). For example, if the machine tool is in operation when the programmable controller detects depression of the emergency stop button or opening of the safety door, the programmable controller stops operation of the machine tool.
For example, the programmable controllers are installed for various machine tools at various factories, and each program controller has a different configuration depending on the type of machine tool, the types of buttons around the machine tool, the type of safety door, the order, etc. For example, a conventional programmable controller 101 shown in FIG. 15 is formed by a base unit 110 and various modules. The base unit 110 has a plurality of slots, or spaces where modules are to be mounted, and the slots are arranged from a first end to a second end of the base unit 110. The various modules are detachably mounted in the slots of the base unit 110. There are various types of modules such as a power supply module 121, a central processing unit (CPU) module 122, a communication module 124, an input module 125, and an output module 126.
For example, in FIG. 15, the power supply module 121 is a module that supplies electric power to each module mounted on the base unit 110, the communication module 124 is a module that communicates with other device(s) by using, e.g., a local area network (LAN), the input module 125 is a module to which input signals from various buttons, switches, etc. are input, and the output module 126 is a module that outputs various control signals. The CPU module 122 determines prescribed order etc. according to a received signal from the input module 125 in accordance with an installed program, and outputs a control signal via the output module 126. The required modules are selected in accordance with the environment in which the programmable controller 101 is to be used, and the selected modules are detachably mounted in the slots of the base unit 110. The prescribed order and the steps of control to be performed in the case where this order is detected are programmed, and the program thus obtained is installed in the CPU module 122.
In FIG. 15, the base unit 110 has, for each slot, a wiring that supplies electric power from the power supply module 121 to each module, and a wiring for communication between the modules, and a slot connector that is fitted in a module connector of the module. The modules are detachably mounted in the slots of the base unit 110 by fitting the module connectors on the slot connectors.
In typical programmable controllers, the power supply module is mounted in the slot at the first end of the base unit, the CPU module is mounted in the slot on the second end side which adjoins the power supply module, and the communication module, the input module, and the output module are mounted in the slots on the second end side which adjoins the CPU module so that there is no empty slot between the modules. Conventionally, adjoining ones of the modules mounted in a region on the second end side with respect to the CPU module (corresponding to the communication region) and including the CPU module transmit and receive information to and from each other.
As shown in FIG. 15, in the conventional programmable controller 101, the power supply module 121 is mounted in the slot at the first end, and the CPU module 122 is mounted at the first end in the communication region 120. The communication module 124, the input module 125, the output module 126, etc. are mounted in the communication region 120 in the direction from the CPU module 122 toward the second end (in this case, the Y-axis direction) so that there is no empty slot between the modules. The programmable controller 101 performs forward communication and backward communication in the communication region 120. The forward communication is communication that is performed to sequentially transmit information from the first end side (in this case, the CPU module 122) to the second end side (in this case, the output module 126) in the communication region 120. The backward communication is communication that is performed to sequentially transmit the information from the second end side (in this case, the output module 126) to the first end side (in this case, the CPU module 122) in the communication region 120.
In the conventional programmable controller 101 shown in FIG. 15, communication [1-1], communication [1-2], and communication [1-3] correspond to the forward communication. The communication [1-1] is communication that is performed to transmit the information from the CPU module 122 to the communication module 124. The communication [1-2] is communication that is performed to transmit the information from the communication module 124 to the input module 125. The communication [1-3] is communication that is performed to transmit the information from the input module 125 to the output module 126. In the conventional programmable controller 101 shown in FIG. 15, communication [2-1], communication [2-2], and communication [2-3] correspond to the backward communication. The communication [2-1] is communication that is performed to transmit the information from the output module 126 to the input module 125. The communication [2-2] is communication that is performed to transmit the information from the input module 125 to the communication module 124. The communication [2-3] is communication that is performed to transmit the information from the communication module 124 to the CPU module 122.
Conventionally, for example, if there is an empty slot between the input module 125 and the output module 126 in the communication region 120 as shown in FIG. 16, the forward communication is completed by the communication [1-1] performed to transmit information from the CPU module 122 to the communication module 124 and the communication [1-2] performed to transmit information from the communication module 124 to the input module 125, and forward communication from the input module 125 to the output module 126 is not performed (since the input module 125 has no module to communicate with in the communication [1-3]). Moreover, the backward communication is completed by the communication [2-1] performed to transmit information from the input module 125 to the communication module 124 and the communication [2-2] performed to transmit information from the communication module 124 to the CPU module 122, and backward communication from the output module 126 to the input module 125 is not performed. Conventionally, it is therefore necessary to mount the modules in the communication region 120 from the first end side (in this case, the left side) with no empty slot between the modules, as shown in the example of FIG. 15.
For example, Japanese Patent Application Publication No. 2002-62908 (JP 2002-62908 A) discloses a programmable controller in which modules are mounted in a plurality of slots of a mother board and which transmits data between the modules by using a ring bus system. In this programmable controller, a bypass mechanism that bypasses the ring bus is provided in a predetermined number of connectors on the mother board (corresponding to the base unit). In an empty slot, the ring bus is bypassed by the bypass mechanism so that communication with the module next to the empty slot can be performed by using the ring bus system.
In the programmable controller described in JP 2002-62908 A, the modules are connected in order by an annular ring bus. For example, if communication is started by the master module, information is sequentially transmitted from the master module to the adjoining module connected to the annular ring bus. After the information is transmitted to the last module, the information is transmitted from the last module to the master module (since the modules are connected in order by the annular ring bus). Accordingly, the information is transmitted in one direction, and this programmable controller cannot be applied as it is to the communication having forward communication and backward communication.